package org.zsl.mybatisplusdemo.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.ibatis.annotations.Options;
import org.springframework.web.bind.annotation.*;
import org.zsl.mybatisplusdemo.entity.Student;

@RestController
@RequestMapping("/student")
@Tag(name="学生管理接口")
public class StudentController {


       @GetMapping("/login")
       @Operation(summary = "登录")
       public String login(Student student){


           if(student.getUsername().equals("admin"))
           {
               return  "admin";
           }else {
               return "guest";
           }

       }

       @PostMapping("/add")
       @Operation(summary = "添加学生")
       public Student add(){
            return  new Student();
       }
}
